🎯 What You'll Learn:
- Signals used in electronic science
- Basic logic gates and combinational logic gates
- Boolean expressions and truth tables
- Creating digital circuits
- Integrated Circuits (ICs)
- Practical applications of logic gates
1. Introduction to Logic Gates
Just like we use signals in daily life (green light to go, red light to stop, horn on a train), computers also use signals to make decisions. These signals are processed through Logic Gates.
💡 What is a Logic Gate?
A Logic Gate is an electronic circuit that processes one or more input signals and produces an output signal based on a specific logical operation. Logic gates use binary values: 0 (False/Off) and 1 (True/On).
Real-Life Examples:
- Safe with Two Keys: Both keys needed to open (AND logic)
- Car Doors: All doors must be closed, or alarm sounds (NOR logic)
- Bus Exit: Can exit from front OR back door (OR logic)
2. Basic Logic Gates
There are three fundamental logic gates:
🔹 AND Gate
Logic: Output is 1 only when ALL inputs are 1
| A | B | Q (A.B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
🔹 OR Gate
Logic: Output is 1 when AT LEAST ONE input is 1
| A | B | Q (A+B) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
🔹 NOT Gate
Logic: Output is the COMPLEMENT (opposite) of the input
| A | Q (Ā) |
|---|---|
| 0 | 1 |
| 1 | 0 |
3. Combinational Logic Gates
These gates are combinations of basic gates to create more complex operations:
🔸 NAND Gate (NOT + AND)
Logic: Complement of AND gate
| A | B | Q (A.B̄) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
🔸 NOR Gate (NOT + OR)
Logic: Complement of OR gate
| A | B | Q (A̅+̅B̅) |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
4. Summary Comparison Table
| Gate | Boolean Expression | Output is 1 when... |
|---|---|---|
| AND | Q = A.B | ALL inputs are 1 |
| OR | Q = A + B | AT LEAST ONE input is 1 |
| NOT | Q = Ā | Input is 0 |
| NAND | Q = A̅.̅B̅ | At least one input is 0 |
| NOR | Q = A̅+̅B̅ | ALL inputs are 0 |
5. Practical Applications (5 Real-World Examples)
📱 Example 1: Home Alarm System
An alarm system using OR gates to protect windows and doors:
- Sensors on Window 1, Window 2, Front Door, Back Door
- If ANY sensor detects opening (input = 1), alarm sounds
- Uses OR gates because alarm should trigger if at least one entry point is opened
💡 Example 2: Street Light Control System
A circuit using multiple gates to control street lights:
- Manual Switch (M): Light turns ON when switch is closed
- Timer (T) + Light Sensor (L̄): Light turns ON when it's dark AND time is between 6 PM - 6 AM
- Uses combination of AND, OR, and NOT gates
- Manual override uses OR logic
- Timer AND darkness uses AND logic
- Light sensor complement uses NOT logic
🚗 Example 3: Car Safety System
A car warning system that alerts the driver when conditions are unsafe:
- Seatbelt Warning: Alert sounds when engine is ON (E) AND seatbelt is NOT fastened (S̄)
- Door Warning: Alert sounds when any door is open (D1, D2, D3, D4) AND car is moving (V)
- Combined warning system: Alert = Seatbelt Warning OR Door Warning
- E.S̄ = Engine ON AND Seatbelt OFF
- (D1+D2+D3+D4) = Any door open
- (D1+D2+D3+D4).V = Any door open AND car moving
🏭 Example 4: Industrial Machine Safety Lock
A factory machine requires multiple safety conditions before operation:
- Machine starts only when: Safety guard is closed (G) AND Emergency button is NOT pressed (Ē) AND Operator key is inserted (K) AND Power is ON (P)
- All conditions must be met simultaneously
- Uses multiple AND gates and one NOT gate
🏠 Example 5: Smart Home Heating System
An intelligent heating system that optimizes comfort and energy:
- Condition 1: Manual override switch (M) - heating ON regardless of other factors
- Condition 2: Temperature is low (T) AND someone is home (H) AND NOT in vacation mode (V̄)
- Condition 3: Schedule timer is active (S) AND temperature is low (T)
6. Integrated Circuits (ICs)
What is an Integrated Circuit?
An Integrated Circuit (IC) is a tiny electronic circuit that contains many components (transistors, resistors, capacitors, diodes) packed into a small chip. Logic gates are implemented using ICs.
Features of ICs:
- Small size - can fit many circuits in one package
- Multiple pins for inputs and outputs
- Used in computers, mobile phones, TVs, calculators, etc.
- Modern microprocessors contain millions of logic gates
7. Practice Activities
📊 Truth Table Practice (5 Activities)
✏️ Activity 1: 3-Input OR Gate
Complete the truth table for:
| A | B | C | Q = A + B + C |
|---|---|---|---|
| 0 | 0 | 0 | ? |
| 0 | 0 | 1 | ? |
| 0 | 1 | 0 | ? |
| 0 | 1 | 1 | ? |
| 1 | 0 | 0 | ? |
| 1 | 0 | 1 | ? |
| 1 | 1 | 0 | ? |
| 1 | 1 | 1 | ? |
✏️ Activity 2: 3-Input NAND Gate
Complete the truth table for:
| A | B | C | Q = A̅.̅B̅.̅C̅ |
|---|---|---|---|
| 0 | 0 | 0 | ? |
| 0 | 0 | 1 | ? |
| 0 | 1 | 0 | ? |
| 0 | 1 | 1 | ? |
| 1 | 0 | 0 | ? |
| 1 | 0 | 1 | ? |
| 1 | 1 | 0 | ? |
| 1 | 1 | 1 | ? |
✏️ Activity 3: Combined Expression (A + B).C
Complete the truth table for:
| A | B | C | A + B | Q = (A + B).C |
|---|---|---|---|---|
| 0 | 0 | 0 | ? | ? |
| 0 | 0 | 1 | ? | ? |
| 0 | 1 | 0 | ? | ? |
| 0 | 1 | 1 | ? | ? |
| 1 | 0 | 0 | ? | ? |
| 1 | 0 | 1 | ? | ? |
| 1 | 1 | 0 | ? | ? |
| 1 | 1 | 1 | ? | ? |
✏️ Activity 4: Combined Expression A.(B + C̄)
Complete the truth table for:
| A | B | C | C̄ | B + C̄ | Q = A.(B + C̄) |
|---|---|---|---|---|---|
| 0 | 0 | 0 | ? | ? | ? |
| 0 | 0 | 1 | ? | ? | ? |
| 0 | 1 | 0 | ? | ? | ? |
| 0 | 1 | 1 | ? | ? | ? |
| 1 | 0 | 0 | ? | ? | ? |
| 1 | 0 | 1 | ? | ? | ? |
| 1 | 1 | 0 | ? | ? | ? |
| 1 | 1 | 1 | ? | ? | ? |
✏️ Activity 5: NOR with 3 Inputs
Complete the truth table for:
| A | B | C | Q = A̅+̅B̅+̅C̅ |
|---|---|---|---|
| 0 | 0 | 0 | ? |
| 0 | 0 | 1 | ? |
| 0 | 1 | 0 | ? |
| 0 | 1 | 1 | ? |
| 1 | 0 | 0 | ? |
| 1 | 0 | 1 | ? |
| 1 | 1 | 0 | ? |
| 1 | 1 | 1 | ? |
✍️ Boolean Expression Practice (5 Activities)
✏️ Activity 6: Safe Lock System
A high-security safe requires THREE keys (A, B, and C) to be inserted simultaneously to open. Write the Boolean expression for the lock mechanism.
✏️ Activity 7: Emergency Exit System
A building has 4 emergency exits (E1, E2, E3, E4). An alarm sounds if ANY of the emergency exits are opened. Write the Boolean expression.
✏️ Activity 8: Air Conditioning System
An air conditioner turns ON when the temperature sensor (T) indicates hot AND the humidity sensor (H) indicates high humidity. However, if the power-saving mode (P) is activated, the AC will NOT turn on. Write the Boolean expression.
✏️ Activity 9: Car Starting System
A car engine will start when: (Key is inserted (K) AND brake is pressed (B)) OR (Remote start button (R) is pressed AND car is in park mode (P)). Write the Boolean expression.
✏️ Activity 10: Automatic Light System
A room light turns ON automatically when: It's dark (light sensor D = 0) AND (motion is detected (M) OR door is opened (O)). Write the Boolean expression.
8. Exam-Style Questions & Answers
Question 1:
What is the output of an AND gate when one input is 1 and the other is 0?
Question 2:
How many rows will be in a truth table for a 4-input logic gate?
Question 3:
What is the difference between AND and NAND gates?
Question 4:
Write the Boolean expression for a 3-input NOR gate and describe when its output is 1.
Question 5:
A library door requires a student ID card (S) AND staff member approval (T) to open. Write the Boolean expression and create the truth table.
Question 6:
What type of gate would you use for a fire alarm system where the alarm should sound if smoke is detected OR heat is detected OR a manual alarm button is pressed?
Question 7:
Complete the truth table for the expression: Q = A.B̄
Question 8:
A vending machine dispenses a drink when: (Correct money is inserted (M) AND button is pressed (B)) OR (Service mode is activated (S)). Write the Boolean expression and explain the logic.
Question 9:
What is an Integrated Circuit (IC) and why are they important in modern electronics?
Question 10:
Design a burglar alarm system for a house with 2 windows (W1, W2) and 1 door (D). The alarm should sound if any window or the door is opened, BUT only if the security system is armed (A). Write the Boolean expression and draw a logic circuit diagram description.
9. Important Tips for Exams
📝 Key Points to Remember:
- AND: All inputs must be 1 → output is 1
- OR: At least one input is 1 → output is 1
- NOT: Reverses the input (0→1, 1→0)
- NAND: Opposite of AND (output 0 only when all inputs are 1)
- NOR: Opposite of OR (output 1 only when all inputs are 0)
- Number of truth table rows = 2n (n = number of inputs)
- Boolean algebra uses "." for AND and "+" for OR
- Bar over a variable (Ā) means complement/NOT operation
🎯 Drawing Truth Tables:
- Count the number of inputs (n)
- Calculate rows needed: 2n
- Write all possible input combinations (start with all 0s, end with all 1s)
- Apply the logic gate rules to find outputs
- Double-check your work!
10. Practice Resources
🖥️ Online Simulators:
- Multimedia Logic (MM Logic): Free software to design and test logic circuits
- Practice drawing circuits and observe how they work in real-time
- Test your truth tables by simulating different input combinations
💪 Study Strategy:
- Memorize the basic truth tables for AND, OR, NOT
- Practice drawing circuit diagrams from Boolean expressions
- Work backwards - write Boolean expressions from given circuits
- Apply to real-world scenarios (alarms, lights, safes)
- Test yourself with past paper questions
Summary Checklist
✅ Before Your Exam, Make Sure You Can:
- ☐ Draw symbols for all 5 logic gates
- ☐ Write truth tables for all basic and combinational gates
- ☐ Convert between Boolean expressions and logic circuits
- ☐ Calculate the number of rows in a truth table (2n)
- ☐ Identify which gate to use for different real-world scenarios
- ☐ Complete truth tables for 3-input gates
- ☐ Explain what Integrated Circuits are and their uses
- ☐ Solve practical problems using logic gates